﻿<UserControl x:Class="monitor_server_2_WPF.ControlTabControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:monitorServer2Wpf="clr-namespace:monitor_server_2_WPF"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />-->
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />-->
                <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />-->
                <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />-->
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Buttons.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
                <ResourceDictionary Source="../../Styles/CustomStylesDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <SolidColorBrush x:Key="GroupsBrush" Color="Gray"/>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Row="0" Name="MainTab" Margin="0,0,0,0" ItemContainerStyle="{StaticResource TabItemStyle1}" Initialized="MainTab_OnInitialized">
            <TabItem Header="Libs" Name="LibsItem" Loaded="LibsItem_OnLoaded">
                <Grid>
                    <DataGrid Name="LibsGrid" BorderBrush="White" BorderThickness="1" CanUserDeleteRows="False" KeyUp="LibsGrid_OnKeyUp" InitializingNewItem="LibsGrid_OnInitializingNewItem">
                        <!--<DataGridTemplateColumn MinWidth="100">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Click="ButInColumn_OnClick" Content="{Binding ButText}"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>-->
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="Monitoring" Name="MonitoringItem" Loaded="MonitoringItem_OnLoaded">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0">
                        <WrapPanel Orientation="Vertical" Width="Auto">
                            <Border Background="{StaticResource GroupsBrush}" CornerRadius="0">
                                <Label Name="GeneralGroupLabel" Foreground="White">General</Label>
                            </Border>
                            <Border BorderThickness="1,0,1,1" BorderBrush="{StaticResource GroupsBrush}">
                                <UniformGrid Columns="2">
                                    <Label Name="LogsTimeoutLabel" Foreground="White" Margin="0,5,6,5">LogsTimeout</Label>
                                    <Grid HorizontalAlignment="Stretch">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <monitorServer2Wpf:NumericUpDown MaximumValue="9999" Grid.Column="0" x:Name="LogsTimeoutBox" HorizontalAlignment="Stretch" MinimumValue="0" Height="26" Margin="0,5"/>
                                        <TextBlock Grid.Column="1" Margin="5,0,5,0" Foreground="White" Text="{Binding SecString}" VerticalAlignment="Center"/>
                                    </Grid>
                                </UniformGrid>
                            </Border>
                            <Border Background="{StaticResource GroupsBrush}" CornerRadius="0">
                                <Label Name="BizssGroupLabel" Foreground="White">BIZSS</Label>
                            </Border>
                            <Border BorderThickness="1,0,1,1" BorderBrush="{StaticResource GroupsBrush}">
                                <UniformGrid Columns="2">
                                    <Label Name="BizssStateLabel" Foreground="White" Margin="0,5,6,5">BizssState</Label>
                                    <CheckBox Name="BizssStateBox" Content="Off" VerticalAlignment="Center" Unchecked="BizssStateBox_OnUnchecked" Checked="BizssStateBox_OnChecked" HorizontalAlignment="Stretch"/>
                                    <Label Name="BizssTimeoutLabel" Foreground="White">BizssTimeout</Label>
                                    <Grid HorizontalAlignment="Stretch">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <monitorServer2Wpf:NumericUpDown MaximumValue="9999" x:Name="BizssTimeoutBox" HorizontalAlignment="Stretch" MinimumValue="0" Height="26" Margin="0,5"/>
                                        <TextBlock Name="SecBlock" Grid.Column="1" Margin="5,0,5,0" Foreground="White" Text="{Binding SecString}" VerticalAlignment="Center"/>
                                    </Grid>
                                </UniformGrid>
                            </Border>
                        </WrapPanel>
                    </StackPanel>
                </Grid>
            </TabItem>
        </TabControl>
        <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="5,3,0,7">
            <Button Name="SaveButton" Margin="0,0,5,0" Click="SaveButton_OnClick">
                <StackPanel Orientation="Horizontal">
                    <Image Name="SaveButImage" Margin="4,0,0,0"/>
                    <Label Name="SaveButLabel" Foreground="White" Content="Save"/>
                </StackPanel>
            </Button>
            <Button Name="DiscardButton" Click="DiscardButton_OnClick">
                <StackPanel Orientation="Horizontal">
                    <Image Name="DiscardButImage" Margin="4,0,0,0"/>
                    <Label Name="DiscardButLabel" Foreground="White" Content="Discard"/>
                </StackPanel>
            </Button>
            <Label Name="StatusLabel">Status</Label>
        </StackPanel>
    </Grid>
</UserControl>
